<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Html事件响应</title>
    <link rel="stylesheet" href="style.css">
    <script src="demo03.js"></script>
</head>

<body>
    <!-- 测试1 html事件处理 缺点：JS和HTML耦合性太强-->
    <!-- <div id="div1" onclick="div1click()">
    </div>

    <div id="div2" ondrag="console.log('drag')">
    </div> -->

    <!-- 测试2 测试3 测试4 参见demo03.js -->
    <div id="div1">
    </div>
    <div id="div2">
    </div>
    
</body>

</html>